// 导入组件
import Vue from 'vue';
import Router from 'vue-router';
// 登录
import login from '@/views/login';
// 首页
import index from '@/views/index';
/**
 * 基础菜单
 */
// 课程管理
import Course from '@/views/course/course';

//考试管理-试题题库-题库列表
import Banklist from '../views/exam/question/banklist';
//考试管理-试题题库-试题添加
import Addquestion from '@/views/exam/question/addquestion';
//考试管理-试题题库-试题标签
import Tag from '@/views/exam/question/tag';

//考试管理-试卷管理-试卷列表
import Paperlist from '@/views/exam/paper/paperlist';
//考试管理-试卷管理-编辑试卷
import Edit from '@/views/exam/paper/edit';


//考试管理-考试管理-添加考试
import Addexam from '@/views/exam/test/addexam';
//考试管理-考试管理-考试列表
import Examlist from '@/views/exam/test/examlist';
//考试管理-考试管理-考试分类
import Examtype from '@/views/exam/test/examtype';

//考试管理-所有学员考试情况
import ShowUserExam from '@/views/exam/test/showuserexam';
//考试管理-查看试卷
import CheckUserExam from '@/views/exam/test/checkuserexam';

//档案管理
import Userexam from '../views/user/userexam';

//考试管理-阅卷管理
//import Readexam from '@/views/exam/readexam';

//档案管理-开始考试
import FinishExam from '@/views/user/finishexam';
//档案管理-查看用户试卷
import CheckExam from '@/views/user/checkexam';


//我们自定义修改的权限页面
import myperm from '@/views/goods/myperm';
//我们自定义修改的角色页面
import myrole from '@/views/goods/myrole';
//我们自定义修改的用户页面
import mymanager from '@/views/goods/mymanager';
//我们自定义修改组件模式
import mymanager1 from '@/views/goods/mymanager1';
// 用户管理
import GoodUser from '@/views/goods/user';
// 机器信息管理
import Machine from '@/views/machine/Machine';
// 货道信息管理
import MachineAisle from '@/views/machine/MachineAisle';
/**
 * 订单管理
 */
// 交易订单
import Order from '@/views/pay/Order';
/**
 * 系统管理
 */
// 用户管理
import user from '@/views/system/user';
// 菜单管理
import Module from '@/views/system/Module';
// 角色管理
import Role from '@/views/system/Role';
// 公司管理
import Dept from '@/views/system/Dept';
// 系统环境变量
import Variable from '@/views/system/Variable';
// 权限管理
import Permission from '@/views/system/Permission';
/**
 * 支付管理
 */
// 支付配置信息
import MachineConfig from '@/views/machine/MachineConfig';
// 支付配置
import Config from '@/views/pay/Config';
/**
 * 数据监控
 */
// 监控查询
import druidLogin from '@/views/druid/login';

// 图表界面
import statistics from '@/views/charts/statistics';

// 启用路由
Vue.use(Router);

// 导出路由
export default new Router({
    routes: [{
        path: '/',
        name: '',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/login',
        name: '登录',
        component: login,
        hidden: true,
        meta: {
            requireAuth: false
        }
    }, {
        path: '/index',
        name: '首页',
        component: index,
        iconCls: 'el-icon-tickets',
        children: [{
            path: '/course/course',
            name: '课程管理',
            component: Course,
            meta: {
                requireAuth: true
            }
        },{
            path: '/exam/question/banklist',
            name: '题库列表',
            component: Banklist,
            meta: {
                requireAuth: true
            }
        },{
            path: '/exam/question/addquestion',
            name: '试题添加',
            component: Addquestion,
            meta: {
                requireAuth: true
            }
        },{
            path: '/exam/question/tag',
            name: '试题标签',
            component: Tag,
            meta: {
                requireAuth: true
            }
        },{
            path: '/exam/paper/paperlist',
            name: '试卷列表',
            component: Paperlist,
            meta: {
                requireAuth: true
            }
        },{
            path: '/exam/paper/edit',
            name: '编辑试卷',
            component: Edit,
            meta: {
                requireAuth: true
            }
        },{
            path: '/exam/test/addexam',
            name: '添加考试',
            component: Addexam,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/exam/test/examlist',
            name: '考试列表',
            component: Examlist,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/exam/test/examtype',
            name: '考试分类',
            component: Examtype,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/exam/test/showuserexam',
            name: '所有学员考试情况',
            component: ShowUserExam,
            meta: {
                requireAuth: true
            }
        },{
            path: '/exam/test/checkuserexam',
            name: '讲师查看某学员考试详情',
            component: CheckUserExam,
            meta: {
                requireAuth: true
            }
        },{
            path: '/user/userexam',
            name: '档案管理',
            component: Userexam,
            meta: {
                requireAuth: true
            }
        },{
            path: '/user/finishexam',
            name: '开始考试',
            component: FinishExam,
            meta: {
                requireAuth: true
            }
        },{
            path: '/user/checkexam',
            name: '查看试卷',
            component: CheckExam,
            meta: {
                requireAuth: true
            }
        },{
            path: '/system/myperm',
            name: 'myperm',
            component: myperm,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/system/myrole',
            name: 'myrole',
            component: myrole,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/system/mymanager',
            name: 'mymanager',
            component: mymanager,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/system/mymanager1',
            name: 'mymanager1',
            component: mymanager1,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/goods/user',
            name: '用户管理',
            component: GoodUser,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/machine/Machine',
            name: '机器信息管理',
            component: Machine,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/machine/MachineAisle',
            name: '货道信息管理',
            component: MachineAisle,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/Order',
            name: '交易订单',
            component: Order,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/user',
            name: '用户管理',
            component: user,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Module',
            name: '菜单管理',
            component: Module,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Role',
            name: '角色管理',
            component: Role,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Dept',
            name: '公司管理',
            component: Dept,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Variable',
            name: '系统环境变量',
            component: Variable,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/system/Permission',
            name: '权限管理',
            component: Permission,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/machine/MachineConfig',
            name: '支付配置信息',
            component: MachineConfig,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/pay/Config',
            name: '支付配置',
            component: Config,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/druid/login',
            name: '监控查询',
            component: druidLogin,
            meta: {
                requireAuth: true
            }
        }, {
            path: '/charts/statistics',
            name: '数据可视化',
            component: statistics,
            meta: {
                requireAuth: true
            }
        }]
    }]
})
